package com.qa.dao;

import com.qa.pojo.Article;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface ArticleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Article record);

    Article selectByPrimaryKey(Integer id);

    List<Article> selectAll();

    int updateByPrimaryKey(Article record);

    List<Article> getByEmail(String email);

    List<Article> getByArticleName(String articleName);

    int updateStatusById(@Param("id") Integer id, @Param("status") Integer status);

    List<Article> getAllByEmail(String email);

    List<Article> getByRandom();

    int getCount(@Param("beginTime") String beginTime,@Param("endTime") String endTime);

    List<Article> getAllByName(String articleName);
}